<?php
require_once 'init.php';

if (array_key_exists('name',$_REQUEST)) {
	$orderId = cf\api\cart\order(
		$_REQUEST['name'],
		$_REQUEST['email'],
	 	$_REQUEST['phone'],
		$_REQUEST['address'],
		$_REQUEST['comments']
	);
	$smarty->assign('orderId',$orderId);
} else {
	$smarty->assign('orderId',false);
	$smarty->assign('cart',$cart);
}

show(
	'buy', 
	'Заказать'
);
?>